<template>
	
	<view class="content">
		<view class="search">
		<u-search placeholder="请输入企业名称" v-model="keyword" shape="square":show-action="false"></u-search>
		</view>
		<view class="Button">
		<u-button @click="inquiry" type="primary" :ripple="true" size="medium">查询</u-button>
		</view>
		<view class="box" v-for="(item,i) in TAList" >
			
	
			<u-row>
				{{item.financialInstitutionName}}信用评估如下：
				<image :src="item.financialInstitutionImage"></image>
				
			</u-row>
			
			</view>
	</view>
	
</template>

<script>
	export default {
		data() {
			return {
				keyword: '',
				TAList:[],
			}
		},
		methods: {
			async inquiry(){
				const res = await this.$myRequest({
						url: '/financialInstitution/getCreditMaterialsByFinancialInstitutionName/'+this.keyword,
						method: 'GET',
						header: {
							'content-type':'application/json'
						},
						data: {
							// "nameornum": this.keyWord
						
						}
					});
					console.log(res,'111111')
					if (res.data.data.length == 0){
						// console.log(666666)
						return uni.showToast({
							title: '未查询到该企业',
							icon: 'none'
						})	
					}
					this.TAList = res.data.data
					
					this.TAList.forEach(item => {
						if (!item.image) {
							item.image = this.DEFAULT_IMAGE
						}
					})
					
						
				}
			}
		
	}
</script>

<style>
.content{
	
	margin-top: 100rpx;		
	
}
.search{
	
		margin-top: 50rpx;
		margin-left: 15rpx;
		margin-right: 15rpx;
	
	
}
.Button{
	margin-left:300rpx;
	margin-top: 30rpx;
}
.box{
	
}
.u-row {
		margin-top: 20rpx;
		background: #FFFFFF;
		font-size: 18px;
		padding: 20px;
		color: #000000;
		letter-spacing: 2px;
	
	}
	
	.text {
		font-size: 14px;
		color: #949494;
		line-height: 2;
	
	}
</style>
